﻿<Window x:Class="OfflineLibrary_WPF.MainWindow"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:my="clr-namespace:OfflineLibrary_WPF;assembly="
DataContext="{Binding RelativeSource={RelativeSource Self}}"
	Title="MainWindow" Height="628" Width="1121">
	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
			<RowDefinition Height="*" />
			<RowDefinition Height="Auto" />
		</Grid.RowDefinitions>
		<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Left">
			<Button Name="btnBack" Width="Auto" Height="Auto" Margin="12" Padding="5">Back</Button>
			<ComboBox Name="cmboOfflineMode" Width="288"
		DisplayMemberPath="Key" 
	SelectedValue="{Binding Path=BrowseMode, Mode=OneWayToSource}"  
	SelectedValuePath="Value" Margin="12" />
		</StackPanel>
		<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Right">
			<Button Name="btnSetDownloadLocation" Width="Auto" Height="Auto" Margin="12" Padding="5">Set Download Location</Button>
			<Button Name="btnUpdateLanguages" Width="Auto" Height="Auto" Margin="12" Padding="5">Update Languages</Button>
			<Button Name="btnDownloadAll" Width="Auto" Height="Auto" Margin="12" Padding="5">Download All Pages In Selected Language</Button>
			<Button Name="btnHelp" Width="Auto" Height="Auto" Margin="12" Padding="5">Help</Button>
		</StackPanel>
		<Grid Grid.Row="1">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="*" />
				<ColumnDefinition Width="Auto" />
				<ColumnDefinition Width="Auto" />
			</Grid.ColumnDefinitions>
		<TextBox Grid.Column="0" Name="txtAddressBar" Text="Please choose a language from below, enter an address, or enter a search term." Margin="5"/>
			<Button Grid.Column="1" Name="btnGo" Margin="5" Padding="5">Go</Button>
			<Button Grid.Column="2" Name="btnToggleParallelBrowsing" Margin="5" Padding="5">Toggle Parallel Browsing</Button>
		</Grid>
		<Grid Grid.Row="2">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="*"	/>
				<ColumnDefinition Width="10" />
				<ColumnDefinition Name="colParallelBrowsing" Width="Auto" />
			</Grid.ColumnDefinitions>
			<Grid Grid.Column="0">
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto" />
					<RowDefinition Height="*" />
				</Grid.RowDefinitions>
				<Grid Grid.Row="0">
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="*" />
						<ColumnDefinition Width="Auto" />
					</Grid.ColumnDefinitions>
					<ComboBox Grid.Column="0" Name="cmboLanguages" HorizontalAlignment="Stretch" DisplayMemberPath="Value" SelectedValuePath="Key" ItemsSource="{Binding}" Margin="5" />
					<ComboBox Grid.Column="1" Name="cmboRomanization" DisplayMemberPath="Key" SelectedValuePath="Value" ItemsSource="{Binding}" Margin="5" />
				</Grid>
				<WebBrowser Grid.Row="1" HorizontalAlignment="Stretch" Name="mainBrowser" VerticalAlignment="Stretch" />
			</Grid>
			<GridSplitter Grid.Column="1" HorizontalAlignment="Stretch" />
			<Grid Name="gridParallelBrowsing" Grid.Column="2" Visibility="Collapsed" HorizontalAlignment="Stretch">
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto" />
					<RowDefinition Height="*" />
				</Grid.RowDefinitions>
				<Grid Grid.Row="0">
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="*" />
						<ColumnDefinition Width="Auto" />
					</Grid.ColumnDefinitions>
					<ComboBox Grid.Column="0" Name="cmboParallelLanguages" HorizontalAlignment="Stretch" DisplayMemberPath="Value" SelectedValuePath="Key" ItemsSource="{Binding}" Margin="5" />
					<ComboBox Grid.Column="1" Name="cmboParallelRomanization" DisplayMemberPath="Key" SelectedValuePath="Value" ItemsSource="{Binding}" Margin="5" />
				</Grid>
				<WebBrowser Grid.Row="1" HorizontalAlignment="Stretch" Name="parallelBrowser" VerticalAlignment="Stretch" />
			</Grid>
		</Grid>
		<Grid Grid.Row="3">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="Auto" />
				<ColumnDefinition Width="*" />
				<ColumnDefinition Width="Auto" />
			</Grid.ColumnDefinitions>
			<Label Grid.Column="0">Background Download Progress:</Label>
			<ProgressBar Grid.Column="1" Name="DownloadProgressBar" Value="{Binding Path=ProgressBarValue, Mode=OneWay}" Maximum="{Binding Path=ProgressBarMax, Mode=OneWay}" />
			<TextBox Grid.Column="1" Name="DownloadProgressBarText" Text="{Binding Path=ProgressBarText, Mode=OneWay}" Background="#00FFFFFF" BorderBrush="#00FFFFFF" />
			<TextBox Grid.Column="2" Text="{Binding Path=ProgressBarMax, Mode=OneWay}" />
		</Grid>
	</Grid>
</Window>